home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / (A)G / (A)G6.ADF / nyquil < prev    next >
Text File  |  1988-05-24  |  881b  |  61 lines

  1. equate zero 0
  2. drive wheel 70
  3.  
  4. cpu 16bit
  5.  
  6. weapon proton 80 50       \ 80 armor, 50 shots \
  7.  
  8. reg 10
  9.  
  10. label begin
  11. posx
  12. # 50
  13. x>y? goto num1
  14. # 180  goto move
  15. label num1 # 0
  16. label move
  17. heading
  18. sto zero                  \ reg 0 has heading (0 or 180) \
  19.  
  20. # 15 speed
  21.  
  22. label here
  23. # 90 radar0
  24. x>0? goto fire         \ look for something to kill \
  25. # 1
  26. rcl zero
  27. # 180 / - # 92 * # 4 +
  28. posx - abs # 15 x>y? swap sto 2 speed
  29. # 1 x<y? goto here
  30.  
  31. label turn
  32. posy # 4 - enter abs sto 8 / # -90 *
  33. heading
  34. rcl 8 speed
  35. # 1
  36. x<y? goto turn
  37.  
  38. # 0 speed
  39. # 180 rcl 0 - sto 0 heading  \ turn around \
  40. # 15 speed
  41. posx posx posx
  42.  
  43. goto here
  44.  
  45. label fire
  46. sto 1                     \ reg 1 has distance \
  47. # 0 speed
  48. # 1
  49. rcl zero # 90 / -         \ if heading 0, gives 1. if heading 180, gives -1. \
  50. rcl 2 # 2.75 / *
  51. rcl 1 / r-d # 90 + aim    \ correction to straight up aim \
  52. sto 1
  53. label fire2
  54. fire 0
  55. goto turn
  56.  
  57.  
  58.  
  59.  
  60.  
  61.